trigger deleteJointCall on JointCall__c (before delete) {
    Profile p  = [select id from profile where name=: 'System Administrator' or name =: '系统管理员'];
        List<JointCall__c> delList = new List<JointCall__c>();
        if(system.trigger.isdelete){
         for (JointCall__c cp : Trigger.old)
         {           
             if((cp.CallDate__c <=date.today())&&(p.id != UserInfo.getProfileId())){
                 cp.addError('该记录不能被删除!');
             }
         }
       
    }
}